Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

7

Indexing Kit

Classes

IXAttributeParser

Inherits From:	Object

Initializing an Instance

- init	Initializes and returns a new IXAttributeParser

Managing Readers

- setAttributeReaders:(List *)aList	Sets the  IXAttributeReaders to those in aList, freeing the previous IXAttributeReaders

- getAttributeReaders:(List *)aList	Returns in aList the IXAttributeReaders

Managing Text Stream Types

- (BOOL)understandsType:(const char *)aType	Returns YES if streams or files of aType are parsed

- addSourceType:(const char *)aType	Sets aType as a type that will be parsed

- removeSourceType:(const char *)aType	Unsets aType as a type that will be parsed

Managing Parse Options

- setMinimumWeight:(unsigned int)anInt	Sets the minimum weight for a token to be included

- (unsigned int)minimumWeight	Returns the minimum weight for a token to be included

- setPercentPassed:(unsigned int)anInt	Sets the percent of tokens dropped

- (unsigned int)percentPassed	Returns the percent of tokens dropped

- setWeightingDomain:(IXWeightingDomain *)aDomain
	Sets the weighting domain for caluculating peculiarities

- (IXWeightingDomain *)weightingDomain	Returns the weighting domain

- setWeightingType:(IXWeightingType)anInt	Sets the type of weighting to calculate

- (IXWeightingType)weightingType	Returns the type of weighting calculated

Parsing Text

- parseFile:(const char *)filename	Parses the contents of filename if possible, adding the
ofType:(const char *)aType		information to the attribute-value list

- parseStream:(NXStream *)stream	Parses the contents of stream if possible, adding the
ofType:(const char *)aType		information to the attribute-value list

- (NXStream *)analyzeFile:(const char *)filename	Parses the contents of filename if possible, adding the
ofType:(const char *)aType		information and returning the analyzed stream

- (NXStream *)analyzeStream:(NXStream *)stream	Parses the contents of stream if possible, adding the
ofType:(const char *)aType		information and returning the analyzed stream

- reset	Clears all compiled information in the attribute-value list

IXAttributeQuery

Inherits From:	Object

Initializing an IXAttributeQuery

- initQueryString:(const char *)aString
andAttributeParser:(IXAttributeParser *)aParser
	Initializes a new IXAttributeQuery with aString as
		the query expression and aParser used to parse it

Accessing Attributes

- (char *)attributeNames	Returns the names of attributes in the query string

- (IXAttributeParser *)attributeParser	Returns the IXAttributeParser

Retrieving the Query Expression

- (const char *)queryString	Returns the query string

Evaluating the Query

- (IXPostingList *)evaluateFor:anObject	Evaluates the query string against anObject, returning the records that match in an IXPostingList

IXAttributeReader

Inherits From:	Object

Analyzing a Stream of Text

- (NXStream *)analyzeStream:(NXStream *)stream
	Analyzes the text in stream, returning a stream of lexed text in Attribute Reader Format

Altering Words

- (unsigned int)foldPlural:(char *)aString	Reduces aString to its singular form
inLength:(unsigned int)aLength

- (unsigned int)reduceStem:(char *)aString	Reduces aString to its base or root form
inLength:(unsigned int)aLength

Setting Reader Options

- setCaseFolded:(BOOL)flag	Sets whether uppercase letters are changed to lowercase

- (BOOL)isCaseFolded	Returns whether uppercase letters are changed to lowercase

- setPluralsFolded:(BOOL)flag	Sets whether plural words are reduced to singular

- (BOOL)arePluralsFolded	Returns whether plural words are reduced to singular

- setStemsReduced:(BOOL)flag	Sets whether words are reduced to base or root forms

- (BOOL)areStemsReduced	Returns whether words are reduced to base or root forms

- setPunctuation:(const char *)aString	Sets the set of characters used to delimit tokens to aString

- (char *)punctuation	Returns the set of characters used to delimit tokens

- setStopWords:(const char *)stopWords	Sets the words that are deleted from a stream

- (char *)stopWords	Returns the words that are deleted from a stream

IXBTree

Inherits From:	Object

Conforms To:	IXBlockAndStoreAccess
IXNameAndFileAccess
IXComparatorSetting
IXComparisonSetting

Accessing IXBTree Information

- (unsigned int)count	Returns the number of key-value pairs in the IXBTree

- (unsigned int)keyLimit	Returns the maximumn allowed length for a key

Affecting IXBTree Contents

- empty	Removes the contents of the IXBTree

- compact	Compacts the IXBTree's contents to consume less space

Optimizing Performance

- optimizeForSpace	Keeps the IXBTree small, making insertions slower but seeks faster

- optimizeForTime	Makes insertions faster, and seeks slower

IXBTreeCursor

Inherits From:	Object

Conforms To:	IXCursorPositioning

Initializing an IXBTreeCursor

- initWithBTree:(IXBTree *)aBTree	Initializes a new IXBTreeCursor to move in aBTree

Accessing the IXBTree

- (IXBTree *)btree	Returns the IXBTree that the cursor moves in

Positioning with Hints

- (BOOL)setKey:(void *)aKey	Positions the IXBTreeCursor at aKey if possible,
andLength:(unsigned int)aLength		using aHint to speed search; returns YES if aKey
withHint:(unsigned int)aHint		is found

- (BOOL)getKey:(void **)aKey	Returns the position of the cursor in aKey and aLength;
andLength:(unsigned int *)aLength		also returning in aHint a hint that can be used to speed
withHint:(unsigned int *)aHint		later search; returns NO if the cursor is past the end of the IXBTree's key space

Accessing IXBTree Data

- (BOOL)writeValue:(void *)aValue	Writes or inserts aValue at the cursor's position
andLength:(unsigned int)aLength

- writeRange:(void *)aRange	Writes aRange into the value at the cursor's position;
atOffset:(unsigned int)anOffset		if the cursor isn't exactly on a key, raises an exception
forLength:(unsigned int)aLength

- (unsigned int)readValue:(void **)aValue	Reads the value at the cursor's position and returns its length; slides forward if needed to get a value

- (unsigned int)readRange:(void **)aRange	Reads a portion of the value at the cursor's position and
ofLength:(unsigned int)aLength		returns its length; if the cursor isn't exactly on a key,
atOffset:(unsigned int)anOffset		raises an exception

- removeValue	Removes the value at the cursor's position; if the cursor isn't exactly on a key, raises an exception

IXFileFinder

Inherits From:	Object

Conforms To:	IXBlockAndStoreAccess
IXNameAndFileAccess
IXFileFinderConfiguration
IXFileFinderQueryAndUpdate
NXReference

Initializing an IXFileFinder

- initInStore:(IXStore *)aStore	Initializes a new IXFileFinder in aStore to index files
atPath:(const char *)path		in path

- initFromBlock:(unsigned int)aHandle	Reloads an IXFileFinder from block aHandle in aStore
inStore:(IXStore *)aStore		 to index files in path
atPath:(const char *)path

- initWithName:(const char *)aName	Initializes a new IXFileFinder named aName in filename
inFile:(const char *)filename		to index files in path
atPath:(const char *)path

- initFromName:(const char *)aName	Reloads an IXFileFinder stored under aName in filename,
inFile:(const char *)filename		allowing writing back to the file according to flag,
forWriting:(BOOL)flag		and set to index files in path
atPath:(const char *)path

IXFileRecord

Inherits From:	Object

Conforms To:	NXTransport

Initializing a New Instance

- initWithFileFinder:(IXFileFinder *)aFileFinder	Initializes a new IXFileRecord for aFileFinder

Getting the File Finder

- (IXFileFinder *)fileFinder	Returns the IXFileFinder that the IXFileRecord belongs to

Accessing  File Attributes

- setFilename:(const char *)aName	Sets the filename that the IXFileRecord refers to to aName

- (const char *)filename	Returns the filename that the IXFileRecord refers to

- setFiletype:(const char *)aType	Sets the recorded type for the associated file to aType

- (const char *)filetype	Returns the recorded type for the associated file

- setDescription:(const char *)aDescription	Sets the description for the associated file to aName

- (const char *)description	Returns the description for the associated file

- setFiledate:(unsigned int)aDate	Sets the recorded creation date for the associated file to aDate

- (unsigned int)filedate	Returns the recorded creation date for the associated file

Accessing UNIX File Information

- (const struct stat *)statBuffer	Returns the cached UNIX stat buffer for the associated file, or NULL if one hasn't been cached

IXLanguageReader

Inherits From:	IXAttributeReader : Object

Conforms To:	IXAttributeReading (IXAttributeReader)

Getting Language Information

+ (char *)installedLanguages	Returns the languages for which readers are installed

+ (Class)classForLanguage:(const char *)aLanguage
	Returns the IXLanguageReader subclass for aLanguage

Getting Objects Associated with Languages

+ readerForLanguage:(const char *)aLanguage	Returns an IXLanguageReader for aLanguage

+ domainForLanguage:(const char *)aLanguage	Returns an IXWeightingDomain for aLanguage

Getting the Target Language

+ (NXAtom)targetLanguage	Returns the target language of the subclass

- (NXAtom)targetLanguage	Returns the target language of the reader

Disabling Dynamic Loading

+ disableLoading	Disables dynamic loading of external language readers

IXPostingCursor

Inherits From:	IXBTreeCursor : Object

Conforms To:	IXPostingExchange
IXPostingOperations
IXCursorPositioning (IXBTreeCursor)

Methods

This class declares no methods.

IXPostingList

Inherits From:	List : Object

Conforms To:	IXPostingExchange
NXTransport

Initializing an IXPostingList

- initWithSource:(id <IXRecordReading>)aSource	Initializes a new IXPostingList to extract objects from aSource

- initWithSource:(id <IXRecordReading>)aSource
andPostingsIn:(id <IXPostingExchange>)anObject	
	Initializes a new IXPostingList to extract objects 
	from aSource and initially contain the postings in anObject

Retrieving the Source

- (id <IXRecordReading>)source	Returns the archive from which objects are extracted

Manipulating Objects by Handle

- addHandle:(unsigned int)aHandle	Adds a new posting to the end of the list
withWeight:(unsigned int)aWeight

- insertHandle:(unsigned int)aHandle	Inserts a new posting at index
withWeight:(unsigned int)aWeight
at:(unsigned int)index

- replaceHandleAt:(unsigned int)index	Replaces the posting at index with the information supplied
with:(unsigned int)aHandle
weight:(unsigned int)aWeight

Manipulating Objects by id

- addObject:anObject	Adds anObject to the end of the list with aWeight, but no
withWeight:(unsigned int)aWeight		posting handle

- insertObject:anObject	Inserts anObject with aWeight at index, but without a
withWeight:(unsigned int)aWeight		posting handle
at:(unsigned int)index

- replaceObjectAt:(unsigned int)index	Replaces the object at index with the object and weight
with:anObject		supplied, but without a posting handle
weight:(unsigned int)aWeight

Manipulating Objects by Index

- (unsigned int)indexForHandle:(unsigned int)handle
	Returns the index of the posting with handle handle

- (unsigned int)handleOfObjectAt:(unsigned int)index
	Returns the handle for the posting at index

- (unsigned int)weightOfObjectAt:(unsigned int)index
	Returns the weight for the posting at index

Sorting the Contents

- sortByWeightAscending:(BOOL)flag	Sorts the postings and objects by their weight

- sortBySelector:(SEL)aSelector	Sorts the postings and objects based on the return values
ascending:(BOOL)flag		of aSelector as sent to each object

IXPostingSet

Inherits From:	Object

Conforms To:	IXPostingExchange
IXPostingOperations

Initializing Instances

- initCount:(unsigned int)count	Inializes a new IXPostingSet to conatin count postings
andPostings:(const IXPosting *)postings

- initWithPostingsIn:anObject	Initializes a new IXPostingSet to contain the postings in anObject

Setting the Postings

- setCount:(unsigned int)count	Sets the postings in the IXPostingSet to count postings,
andPostings:(const IXPosting *)postings		copying them if flag is YES
byCopy:(BOOL)flag

Accessing Postings by Position

- (unsigned int)setPosition:(unsigned int)index	Sets the selected posting to the one at position index

Performing Set Operations

- formUnionWithPostingsIn:(id <IXPostingExchange>)anObject
	Performs a set union with the postings in anObject, altering the IXPostingSet's contents but not anObject's

- formIntersectionWithPostingsIn:(id <IXPostingExchange>)anObject
	Performs a set intersection with the postings in anObject, altering the IXPostingSet's contents but not anObject's

- subtractPostingsIn:(id <IXPostingExchange>)anObject
	Performs a set subtraction with the postings in anObject, altering the IXPostingSet's contents but not anObject's

IXRecordManager

Inherits From:	Object

Conforms To:	IXBlockAndStoreAccess
IXNameAndFileAccess
IXRecordWriting
IXTransientAccess
IXTransientMessaging

Adding and Removing Attributes

- addAttributeNamed:(const char *)aName	Creates an attribute named aName, based on the values
forSelector:(SEL)aSelector		returned by objects sent aSelector

- (BOOL)hasAttributeNamed:(const char *)aName	Returns whether an attribute named aName exists

- removeAttributeNamed:(const char *)aName	Removes the attribute named aName

Key Comparison

- setComparisonFormat:(const char *)aFormat	Sets the data format used for values in the attribute named
forAttributeNamed:(const char *)aName		aName

- (const char *)comparisonFormatForAttributeNamed:(const char *)aName
	Returns the data format used for values in the attribute named aName

- setComparator:(IXComparator *)aComparator	Sets the comparator function and context  used for values
andContext:(const void *)aContext		in the attribute named aName
forAttributeNamed:(const char *)aName

- getComparator:(IXComparator **)aComparator	Returns the comparator function and context  used for
andContext:(const void **)aContext		values in the attribute named aName
forAttributeNamed:(const char *)aName

Setting Attribute Targets

- setTargetClass:aClass	Restricts the attribute named aName to contain references 
forAttributeNamed:(const char *)aName		only to objects of class aClass (or a subclass)

- getTargetName:(const char **)aName	Returns the name and class version of the target class for 
andVersion:(unsigned int *)targetVersion		the attribute named aName
forAttributeNamed:(const char *)aName

Accessing Attributes

- (IXPostingCursor *)cursorForAttributeNamed:(const char *)aName
	Returns an IXPostingCursor that may be used to search for values for the attribute named aName

Getting Attribute Information

- (SEL)selectorForAttributeNamed:(const char *)aName

	Returns the selector used to build the attribute named aName

- (char *)attributeNames	Returns the names of all attributes in the IXRecordManager

Accessing Classes

- (char *)classNames	Returns the names of all classes that have instances stored in the IXRecordManager

- (char *)attributeNamesForClass:aClass	Returns the names of the attributes in the IXRecordManager that contain references to instances of aClass (or a subclass)

- (IXPostingList *)recordsForClass:aClass	Returns in an IXPostingList all instances in the IXRecordManager of aClass (but not subclasses)

Discarding Records

- discardRecord:(unsigned int)aHandle	Discards the records identified by aHandle

- reclaimRecord:(unsigned int)aHandle	Reclaimes the discarded record identified by aHandle

- (IXPostingList *)discards	Returns in an IXPostingList all discarded records

- clean	Permanently deletes all discarded records

Setting Attribute Descriptions

- setDescription:(const char *)aDescription	Sets the description for the attribute named aName to
forAttributeNamed:(const char *)aName		aDescription

- getDescription:(char **)aDescription	Returns the description for the attribute named aName
forAttributeNamed:(const char *)aName

Setting Parsers

- setParser:(IXAttributeParser *)aParser	Sets the IXAttributeParser used for the attribute named
forAttributeNamed:(const char *)aName		aName

- (IXAttributeParser *)parserForAttributeNamed:(const char *)aName
	Returns the IXAttributeParser used for the attribute named aName

Writing Blobs

- (BOOL)setValue:(const void *)aValue	Stores aValue under blobName on behalf of the record
andLength:(unsigned int)aLength		identified by aHandle; returns YES on success, NO 
ofBlob:(const char *)blobName		otherwise
forRecord:(unsigned int)aHandle

- (BOOL)getValue:(void **)aValue	Retrieves the value and length for blobName on behalf of
andLength:(unsigned int *)aLength		the record identified by aHandle; returns YES on
ofBlob:(const char *)blobName		success, NO otherwise
forRecord:(unsigned int)aHandle

IXStore

Inherits From:	Object

Initializing, Copying, and Freeing Instances

- init	Initializes a new IXStore

- copy	Returns a copy of the IXStore that references the same storage

- free	Deallocates the IXStore, and all the storage if it's not shared

Creating, Copying, and Freeing Blocks

- createBlock:(unsigned int *)aHandle	Creates a block of size size and returns its identifier in
ofSize:(unsigned int)size		aHandle

- (unsigned int)copyBlock:(unsigned int)aHandle	Copies a portion of the block identified by aHandle and
atOffset:(unsigned int)anOffset		returns the copies identifier
forLength:(unsigned int)aLength

- freeBlock:(unsigned int)aHandle	Frees the block identified by aHandle

Opening and Closing Blocks

- (void *)openBlock:(unsigned int)aHandle	Opens a portion of the block identified by aHandle for 
atOffset:(unsigned int)anOffset		writing if possible, otherwise raises an exception
forLength:(unsigned int)aLength

- (void *)readBlock:(unsigned int)aHandle	Opens a portion of the block identified by aHandle for 
atOffset:(unsigned int)anOffset		reading if possible, otherwise raises an exception
forLength:(unsigned int)aLength

- closeBlock:(unsigned int)aHandle	Closes the open block identified by aHandle

Managing Block Sizes

- resizeBlock:(unsigned int)aHandle	Resizes the block identified by aHandle to aSize
toSize:(unsigned int)aSize

- (unsigned int)sizeOfBlock:(unsigned int)aHandle	Returns the size of the block identified by aHandle

Using Transactions

- (unsigned int)startTransaction	Starts a new transaction and returns the nested level of transactions pending

- abortTransaction	Aborts the current transaction

- commitTransaction	Commits the changes made in the current transaction

- (BOOL)areTransactionsEnabled	Returns YES if a transaction has ever been started

- (unsigned int)nestingLevel	Returns the nesting level of transactions pending

- (unsigned int)changeCount	Returns the number of commitTransaction and abortTransaction messages received by the instantiation

Accessing the Contents

- setContents:(vm_address_t)someContents	Replaces the IXStore's storage with that in someContents
andLength:(vm_size_t)aLength

- getContents:(vm_address_t *)theContents	Returns in theContents and aLength the IXStore's storage
andLength:(vm_size_t *)aLength		and its length

Reducing Memory Consumption

- compact	Compacts the blocks of storage to take as little space as possible; delayed until all transactions are finished

IXStoreBlock

Inherits From:	Object

Conforms To:	IXBlockAndStoreAccess
NXReference

Accessing the Block's Contents

- (void *)openAtOffset:(unsigned int)anOffset	Opens a portion of the block for writing if possible; raises
forLength:(unsigned int)aLength		an exception otherwise

- (void *)readAtOffset:(unsigned int)anOffset	Opens a portion of the block for reading if possible; raises
forLength:(unsigned int)aLength		an exception otherwise

- (unsigned int)copyAtOffset:(unsigned int)anOffset
forLength:(unsigned int)aLength	Copies a portion of the block, returning the copy's 
		identifier

- close	Closes the block if it's been opened

Managing the Block Size

- resizeTo:(unsigned int)size	Resizes the block to size

- (unsigned int)size	Returns the size of the block

Archiving an Object in an IXStoreBlock

- readObject	Unarchives the object previously archived into the block

- writeObject:(unsigned int)anObject	Archives anObject into the block

IXStoreDirectory

Inherits From:	Object

Conforms To:	IXBlockAndStoreAccess
IXNameAndFileAccess

Adding Entries or Objects

- addEntryNamed:(const char *)aName	Creates an instance of the store client class named aName,
ofClass:aName		and stores it under aName

- addEntryNamed:(const char *)aName	Creates an instance of the store client class named aName,
ofClass:aName		and stores it under aName in the block of the 
atBlock:(IXBlockHandle)aHandle		IXStoreDirectory's IXStore identified by aHandle

- addEntryNamed:(const char *)aName	Stores the store client anObject under aName
 forObject:anObject

Removing Entries

- freeEntryNamed:(const char *)aName	Removes from the IXStore the object stored under aName

- removeName:(const char *)aName	Removes the reference to the object stored under aName, but doesn't remove the object itself

- empty	Empties all stored objects and names

- reset	Removes all references to stored objects, but not the objects themselves 

Getting Entries

- (BOOL)hasEntryNamed:(const char *)aName	Returns whether there's an object stored under aName

- getBlock:(unsigned int *)aHandle	Gets the block identifier for the object stored under aName
ofEntryNamed:(const char *)aName

- getClass:(id *)aClass	Gets the class object for the object stored under aName
ofEntryNamed:(const char *)aName

- openEntryNamed:(const char *)aName	Activates and returns the object stored under aName

- (const char **)entries	Returns the stored names

IXStoreFile

Inherits From:	IXStore : Object

Initializing and Freeing Instances

- init	Initializes a new IXStoreFile in a temporary file

- initWithFile:(const char *)filename	Initializes a new IXStoreFile with a file named filename

- initFromFile:(const char *)filename	Initializes an IXStoreFile from existing storage in filename,
forWriting:(BOOL)flag		allowing writing back to the file if flag is YES

- free	Frees the IXStoreFile, but doesn't affect the storage file

Limiting the File Mapping Size

- setSizeLimit:(vm_size_t)aLimit	Sets the caching limit for the IXStoreFile to aLimit

- (vm_size_t)sizeLimit	Returns the caching limit for the IXStoreFile

Getting File Information

- (int)descriptor	Returns the file descriptor for the storage file

- (const char *)filename	Returns the name of the storage file

IXWeightingDomain

Inherits From:	Object

Initializing Instances

- initFromDomain:(NXStream *)stream	Initializes a new IXWeightingDomain from domain format data in stream

- initFromHistogram:(NXStream *)stream	Initializes a new IXWeightingDomain from histogram format data in stream

- initFromWFTable:(NXStream *)stream	Initializes a new IXWeightingDomain from NeXTSTEP 2.0 WFTable format data in stream

Saving Domain Information

- writeDomain:(NXStream *)stream	Write domain format data to stream

- writeHistogram:(NXStream *)stream	Writes histogram format data to stream

- writeWFTable:(NXStream *)stream	Writes NeXTSTEP 2.0 WFTable format data to stream

Counting Tokens

- (unsigned int)totalTokens	Returns the total number of tokens in the weighting domain

- (unsigned int)uniqueTokens	Returns the total number of unque tokens

Retrieving Information about Tokens

- (unsigned int)countForToken:(void *)aToken	Returns the number of occurrences of aToken in the domain
ofLength:(unsigned int)aLength

- (unsigned int)rankForToken:(void *)aToken	Returns the ordinal rank of occurrences of aToken in the 
 ofLength:(unsigned int)aLength		domain

- (float)frequencyOfToken:(void *)aToken	Returns the frequency of aToken in the domain
ofLength:(unsigned int)aLength

- (float)peculiarityOfToken:(void *)aToken	Returns the peculiarity of aToken in the domain
ofLength:(unsigned int)aLength
andFrequency:(float)aFrequency